<script>
export default {
  onLaunch: function () {
    console.log('App Launch')
  },
  onShow: function () {
    console.log('App Show')
    const token = uni.getStorageSync('Token') || null
    // uni.setStorageSync(
    //   'Token',
    //   `eyJhbGciOiJIUzUxMiJ9.eyJhdXRoX3R5cGUiOiJBUFAiLCJhY2NvdW50X2lkIjoiNjRlNmZlYWJlNGIwZDhjYTgzNDNjNWQ4IiwiZXhwaXJlX3RpbWUiOm51bGwsImxvZ2luX3VzZXJfa2V5IjoiNjZjZWYzNjBlNGIwMmNiNDFiN2ZkMjNjIn0.hYRTlqtHjw1cIj8JNjDSacaU_H4U51nV2TDnAcWzx0qt8ISAE99xdWtirHd0rGf1AO_tsYEaoD7aKsDv4O0rfe`
    // )
    if (!token) {
      uni.$u.toast('Token校验失败,请重新登录！！！')
      setTimeout(() => {
        uni.reLaunch({
          url: '/pages/login/index'
        })
      }, 500)
      return
    }
  },
  onHide: function () {
    console.log('App Hide')
  }
}
</script>

<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
// @import '@/uni_modules/uview-ui/index.scss';
@import '@/styles/index.scss';
</style>
